package com.smooth.mall.Config;

import com.smooth.mall.common.Constant;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;

public class SmoothMallWebMvcConfig implements WebMvcConfigurer{


    @Override
    public void addResourceHandlerS(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("swagger-ui.html")
                .addResourceLocations("classpath:/META-INF/resource/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resource/webjars/");
        registry.addResourceHandler("/upload/**")
                .addResourceLocations("file:"+ Constant.FILE_UPLOAD_DIR);
    }
}
